package com.subumbo.audio.core
{
	import __AS3__.vec.Vector;
	
	public class Sequencer extends AudioEngine
	{
		public function Sequencer()
		{
		}
		
		/* private function initSequencer():void
		{
			_currentPosition = 0;
			
			_midiChannels = []
			for(var i:uint = 0; i < 9; i++)
			{
				var midiChannel:Vector.<MidiObject> = new Vector.<MidiObject>();
				for(var j:uint = 0; j < 16; j++)
				{
					var midi:MidiObject = new MidiObject();
					midiChannel.push(midi);
				}
				_midiChannels.push(midiChannel);
				_loop.push(false);
			}
		}
		
		private function advancePlayhead():void
		{	
			var j:uint = 0;
			for(j; j < _midiChannels.length; j++)
			{
				switch(_midiChannels[j][_currentPosition].note)
				{
					case 1 : 	_voices[j] = true; _pointers[j] = 0;break;
					case 2 :   	_voices[j] = false; break; 
				}
			}
		
			if(_currentPosition == 15)
			{
				_currentPosition = 0;
			}else	
			{
				_currentPosition++;
			}
			Application.application.sequencer.advancePlayhead();
			
		}
		
		
		public function changePattern(channel:uint, index:uint):void
		{
			var boo:uint = _midiChannels[channel][index].note;
			switch(boo)
			{
				case 0 : 	_midiChannels[channel][index].note = 1; break;	
				case 1 : 	_midiChannels[channel][index].note = 2; break;
				case 2 : 	_midiChannels[channel][index].note = 0; break;		
			}
		} */
	}
}